<?php
include_once(PATH_APP_COMMON . "AuthManager.php");
class Controller_AdminUser extends Controller_AdminList  {
	
	protected $_tplForCreate = 'User_Create';
	protected $_tplForEdit = 'User_Create';
	protected $_tplForIndex = 'User_Index';
	protected $_tplForSearch = 'User_Search';
	
	
	function __construct()
	{
		parent::__construct();
		$this->assign("option_group",$this->model->hashGroup);
	}
	
	protected function _setIndexCondition(&$conditions,&$message){
		
		$search = _gp("search","array");
	
		$like = array(
			"username" 	=> $search['username'],
			"email"		=> $search['email'],
		);

		$exact = array(
			"groupid" =>  intval($search['groupid']),
		);
		
		$range = array(
			"uid" => intval($search['uid_start']) . '~' . intval($search['uid_end']),
		);

		$this->assign("search",$search);

		$conditions = $this->phaseConditions($like,$exact,$date,$range);

		!empty($conditions) && $message = "搜索结果:";
	}
}
